<template>
	<van-field
	  v-model="classification"
	  name="classification"
	  is-link
	  readonly
	  placeholder="请选择分类"
	  @click="showPicker = true"
	/>
	<van-popup v-model:show="showPicker" position="bottom">
	  <van-picker
	    :columns="columns"
	    @cancel="showPicker = false"
	    @confirm="onConfirm"
	  />
	</van-popup>
</template>
<script setup>
	import { ref } from 'vue';
	
	const columns = ['动漫', '漫画', '游戏', '小说', '音乐'];
	const classification = ref('');
	const showPicker = ref(false);

	const onConfirm = (value) => {
	  classification.value = value;
	  showPicker.value = false;
	};
	
</script>

<style>
	
</style>